<style>
.layui-layer-title{
    height: 30px!important;
    line-height: 30px!important;
}
.lay-box{
    border: 1px #dfdfdf solid;
    width: 98%;
    height: 99%;
    margin: 0 auto;
}
.lay-box .lay-content{
    width: 37%;
    margin-left: 20%;
    margin-top: 1rem;
}
.lay-box .lay-content .lay-span{
    font-size: 0.2rem;
    color: #a4a4a4;
}
.lay-box .lay-content .rig{
    float: right;
}
.lay-box .lay-content .rig .lay-input-text{
    border: 1px solid #9F9F9F;
    font-size: 0.7rem;
    padding: 0.3rem 0.4rem;
    margin-left: 0.2rem;
    color: black;
}
.lay-box .lay-content .rig .lay-submit{
    background: #01AAED;
    padding: 0.5rem 3rem;
    color: white;
    border-radius: 6px;
    margin-top: 1.2rem;
}
</style>
<div class="lay-box">
    <div class="lay-content">
        <span class="lay-span">岗位名：</span>
        <div class="rig"><input type="text" class="lay-input-text" value="{$data.title}"><br>
        <input type="submit" value="提交" class="lay-submit"></div>
    </div>
</div>
<input type="hidden" name="id" value="{$data.id}">
<script src="/resource/libs/jquery/jquery.js"></script>
<script src="/static/js/layer/layer.js"></script>
<script>
   $('.lay-submit').click(function(){
       var id = $('input[name=id]').val();
       var title = $('.lay-input-text').val();
       $.post('{:url("/index/Authgroup/edit")}',{id:id,title:title},function(data){
           if (data.code==1) {
                layer.msg(data.msg,{icon: 1});
                window.setTimeout(function(){
                    window.parent.location.reload();
                },1000)
           }
       })
   })
</script>